@extends('Admin.layout.layout')
@section('title','查看板块')
@section('home','板块管理')
@section('weizhi','查看板块')
@section('con')
	@if(session('error'))
		<div class="alert alert-danger">
			{{session('error')}}
	  </div>
	@endif	

	@if(session('success'))	
<div class="row">
			<div class="alert alert-success fade in">
        {{session('success')}}
      </div>

	@endif			

      <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading" style="display:block;position:relative;">
               <font style="display:block;position:absolute;float:left"><font>帖子分类列表</font></font>
                <div class="nav search-row" id="top_menu" style="position: absolute;float: left;margin-left: 100px;margin-top: 6px;">
                    <!--  search form start -->
                    <ul class="nav top-menu">                    
                        <li style="border:0px">
                            <form class="navbar-form" method="get" action="{{url('/admin/posttype/index')}}">
                                <input class="form-control" placeholder="Search" name="keywords" value="{{$data['keywords'] or ''}}" type="text">
                                <button class="btn btn-default"><span class="icon_cloud-upload_alt"></span><font><font class=""> 搜索</font></font></button>
                                <!-- <button class="btn btn-primary" >搜索</button> -->
                                
                            </form>
                        </li>                    
                    </ul>
                    <!--  search form end -->                
                </div>
          </header>
            
            <table class="table table-striped table-advance table-hover">
             <tbody>
                <tr>
                   <th><i class="icon_profile"></i> 板块名</th>
                   <th><i class="icon_calendar"></i> 板块详情</th>
                   <th><i class="icon_calendar"></i> 操作</th>

                </tr>
                @foreach($post as $k=>$v)
                <tr>
                   <td>{{$v->name}}</td>
                   <td>{{$v->content}}</td>
                   <td>
                    <div class="btn-group">
                        
                        <a href="{{url('/admin/posttype/edit',['id'=>$v->id])}}" class="btn btn-success"><i >修改</i></a>
                        <a href="{{url('/admin/posttype/delete',['id'=>$v->id])}}" class="btn btn-danger"><i>删除</i></a>
                    </div>
                    </td>
                </tr>
                @endforeach           
             </tbody>
          </table>
          <div style="text-align: center;">
  
          <!-- {!! $post->render() !!} -->
              {!! $post -> appends($data) -> render() !!}
          </div>
        </section>
      </div>
</div>
<script type="text/javascript" src="/bootcss/admin/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
  $(".btn-danger").click(function(){
      res = confirm('确定要删除该条信息?');
      if(!res){
          return false;
      }
  });
</script>
@endsection